import matplotlib
from numpy import *
import matplotlib.pyplot as plt
import treePlotter


# testData = array([[2, 3], [2, 4]])

def show(data, label, target=None):
    fig = plt.figure()
    ax = fig.add_subplot(111)
    ax.scatter(data[:, 0], data[:, 1], 15.0 * array(label), 15.0 * array(label))
    if target is not None:
        ax.scatter(target[0], target[1], 100, 100)
    plt.show()


# tree decisionTree data, example: {'no surfacing': {0: 'no', 1: {'flippers': {0: 'no', 1: 'yes'}}}}
def showTree(tree):
    treePlotter.createPlot(tree)
